package com.vito.dcs.alarm.service.impl;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.dubbo.config.annotation.Service;
import com.vito.base.factory.IDFactory;
import com.vito.dcs.alarm.model.RollerAlarmModel;
import com.vito.dcs.alarm.service.RollerAlarmService;

@Service
public class RollerAlarmServiceImpl implements RollerAlarmService{

	@Autowired
	private com.vito.dcs.alarm.dao.RollerAlarmMapper rollerAlarmMapper;
	
	@Override
	public void saveRollerAlarm(RollerAlarmModel rollerAlarmModel) {
		String id = IDFactory.getIDFactory().getIdInc("tbl_dcs_sys_roller_alarm")+"";
		rollerAlarmModel.setId(id);
		rollerAlarmMapper.deleteRollerAlarm(rollerAlarmModel);
		rollerAlarmMapper.saveRollerAlarm(rollerAlarmModel);
	}

	@Override
	public void deleteRollerAlarm(RollerAlarmModel rollerAlarmModel) {
		rollerAlarmMapper.deleteRollerAlarm(rollerAlarmModel);
	}

	@Override
	public RollerAlarmModel queryRollerAlarmBySectionId(
			RollerAlarmModel rollerAlarmModel) {
		RollerAlarmModel rolAlarmModel = rollerAlarmMapper.queryRollerAlarmBySectionId(rollerAlarmModel);
		return rolAlarmModel;
	}

}
